package com.towery.dbsrcmanager.config;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;

import javax.sql.DataSource;

/**事务配置
 * Created by User on 2016/11/23.
 */
@Configuration
public class TransactionBaseConfiguration {
    @Bean(name = "BaseTransactionManager")
    public DataSourceTransactionManager baseTransactionManager(@Qualifier("base") DataSource dataSource) {
        return new DataSourceTransactionManager(dataSource);
    }
}
